.class public Lcom/TwinBlade/PicturePassword/Crop;
.super Landroid/app/Activity;
.source "SourceFile"


# instance fields
.field private a:Landroid/graphics/Bitmap;

.field private b:Landroid/graphics/Bitmap;

.field private c:Lcom/TwinBlade/PicturePassword/TouchImageView;

.field private d:Landroid/content/Context;

.field private e:Landroid/app/ProgressDialog;

.field private f:Landroid/app/ProgressDialog;

.field private g:Landroid/os/Handler;

.field private h:Ljava/lang/Runnable;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 39
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    return-void
.end method

.method private a(Landroid/graphics/BitmapFactory$Options;IIZ)I
    .locals 3
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 211
    iget v1, p1, Landroid/graphics/BitmapFactory$Options;->outHeight:I

    .line 212
    iget v2, p1, Landroid/graphics/BitmapFactory$Options;->outWidth:I

    .line 213
    const/4 v0, 0x1

    .line 215
    if-gt v1, p3, :cond_0

    if-le v2, p2, :cond_1

    .line 216
    :cond_0
    if-le v1, v2, :cond_3

    .line 217
    if-eqz p4, :cond_2

    int-to-float v0, v2

    int-to-float v1, p2

    div-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v0

    .line 222
    :cond_1
    :goto_0
    return v0

    .line 217
    :cond_2
    int-to-float v0, v1

    int-to-float v1, p3

    div-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v0

    goto :goto_0

    .line 219
    :cond_3
    if-eqz p4, :cond_4

    int-to-float v0, v1

    int-to-float v1, p3

    div-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v0

    goto :goto_0

    :cond_4
    int-to-float v0, v2

    int-to-float v1, p2

    div-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v0

    goto :goto_0
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/Crop;)Landroid/content/Context;
    .locals 1
    .parameter

    .prologue
    .line 45
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->d:Landroid/content/Context;

    return-object v0
.end method

.method private a(Landroid/net/Uri;)Ljava/lang/String;
    .locals 6
    .parameter

    .prologue
    .line 133
    const/4 v0, 0x1

    :try_start_0
    new-array v2, v0, [Ljava/lang/String;

    const/4 v0, 0x0

    .line 134
    const-string v1, "_data"

    aput-object v1, v2, v0

    .line 135
    const/4 v3, 0x0

    const/4 v4, 0x0

    const/4 v5, 0x0

    move-object v0, p0

    move-object v1, p1

    invoke-virtual/range {v0 .. v5}, Lcom/TwinBlade/PicturePassword/Crop;->managedQuery(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    .line 136
    if-eqz v0, :cond_0

    .line 137
    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/Crop;->startManagingCursor(Landroid/database/Cursor;)V

    .line 138
    const-string v1, "_data"

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v1

    .line 139
    invoke-interface {v0}, Landroid/database/Cursor;->moveToFirst()Z

    .line 140
    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 145
    :goto_0
    return-object v0

    .line 142
    :cond_0
    invoke-virtual {p1}, Landroid/net/Uri;->getPath()Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    goto :goto_0

    .line 144
    :catch_0
    move-exception v0

    .line 145
    invoke-virtual {p1}, Landroid/net/Uri;->getPath()Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method private a()V
    .locals 6

    .prologue
    const/4 v5, 0x0

    .line 226
    invoke-static {p0}, Landroid/app/WallpaperManager;->getInstance(Landroid/content/Context;)Landroid/app/WallpaperManager;

    move-result-object v0

    .line 227
    invoke-virtual {v0}, Landroid/app/WallpaperManager;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    .line 228
    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getMinimumHeight()I

    move-result v1

    .line 229
    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getMinimumWidth()I

    move-result v2

    .line 231
    sget-object v3, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v2, v1, v3}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v3

    iput-object v3, p0, Lcom/TwinBlade/PicturePassword/Crop;->a:Landroid/graphics/Bitmap;

    .line 232
    new-instance v3, Landroid/graphics/Canvas;

    iget-object v4, p0, Lcom/TwinBlade/PicturePassword/Crop;->a:Landroid/graphics/Bitmap;

    invoke-direct {v3, v4}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 233
    invoke-virtual {v0, v5, v5, v2, v1}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 234
    invoke-virtual {v0, v3}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 235
    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/Crop;Landroid/app/ProgressDialog;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 47
    iput-object p1, p0, Lcom/TwinBlade/PicturePassword/Crop;->f:Landroid/app/ProgressDialog;

    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/Crop;Landroid/graphics/Bitmap;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 42
    iput-object p1, p0, Lcom/TwinBlade/PicturePassword/Crop;->b:Landroid/graphics/Bitmap;

    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/Crop;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 150
    invoke-direct {p0, p1}, Lcom/TwinBlade/PicturePassword/Crop;->a(Z)V

    return-void
.end method

.method private a(Z)V
    .locals 8
    .parameter

    .prologue
    const/4 v3, 0x0

    const/4 v6, 0x1

    const/4 v1, 0x0

    .line 151
    .line 152
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/Crop;->getIntent()Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v0

    if-eqz v0, :cond_6

    .line 153
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/Crop;->getIntent()Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v0

    move-object v4, v0

    .line 155
    :goto_0
    if-nez v4, :cond_1

    .line 156
    invoke-virtual {p0, v1}, Lcom/TwinBlade/PicturePassword/Crop;->setResult(I)V

    .line 157
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/Crop;->finish()V

    .line 208
    :cond_0
    :goto_1
    return-void

    .line 161
    :cond_1
    new-instance v7, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v7}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    .line 162
    iput-boolean v6, v7, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 164
    :try_start_0
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/Crop;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    invoke-virtual {v0, v4}, Landroid/content/ContentResolver;->openInputStream(Landroid/net/Uri;)Ljava/io/InputStream;

    move-result-object v0

    .line 165
    const/4 v2, 0x0

    invoke-static {v0, v2, v7}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 170
    :goto_2
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/Crop;->getWindowManager()Landroid/view/WindowManager;

    move-result-object v0

    invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v0

    .line 171
    invoke-virtual {v0}, Landroid/view/Display;->getWidth()I

    move-result v2

    invoke-virtual {v0}, Landroid/view/Display;->getHeight()I

    move-result v0

    invoke-direct {p0, v7, v2, v0, p1}, Lcom/TwinBlade/PicturePassword/Crop;->a(Landroid/graphics/BitmapFactory$Options;IIZ)I

    move-result v0

    iput v0, v7, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    .line 172
    iput-boolean v1, v7, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 174
    new-instance v5, Landroid/graphics/Matrix;

    invoke-direct {v5}, Landroid/graphics/Matrix;-><init>()V

    .line 177
    :try_start_1
    new-instance v0, Landroid/media/ExifInterface;

    invoke-direct {p0, v4}, Lcom/TwinBlade/PicturePassword/Crop;->a(Landroid/net/Uri;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v0, v2}, Landroid/media/ExifInterface;-><init>(Ljava/lang/String;)V

    .line 178
    const-string v2, "Orientation"

    invoke-virtual {v0, v2}, Landroid/media/ExifInterface;->getAttribute(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 179
    const-string v2, "6"

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_2

    .line 180
    const/high16 v0, 0x42b4

    invoke-virtual {v5, v0}, Landroid/graphics/Matrix;->postRotate(F)Z
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    move v2, v6

    .line 194
    :goto_3
    :try_start_2
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/Crop;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    invoke-virtual {v0, v4}, Landroid/content/ContentResolver;->openInputStream(Landroid/net/Uri;)Ljava/io/InputStream;

    move-result-object v0

    .line 195
    const/4 v4, 0x0

    invoke-static {v0, v4, v7}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_2

    move-result-object v0

    .line 199
    :goto_4
    if-eqz v0, :cond_0

    .line 200
    if-eqz v2, :cond_4

    .line 201
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v3

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v4

    move v2, v1

    invoke-static/range {v0 .. v6}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;

    move-result-object v1

    iput-object v1, p0, Lcom/TwinBlade/PicturePassword/Crop;->a:Landroid/graphics/Bitmap;

    .line 202
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    goto :goto_1

    .line 166
    :catch_0
    move-exception v0

    .line 167
    invoke-static {}, Lorg/acra/ACRA;->getErrorReporter()Lorg/acra/ErrorReporter;

    move-result-object v2

    invoke-virtual {v2, v0}, Lorg/acra/ErrorReporter;->a(Ljava/lang/Throwable;)V

    goto :goto_2

    .line 182
    :cond_2
    :try_start_3
    const-string v2, "3"

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_3

    .line 183
    const/high16 v0, 0x4334

    invoke-virtual {v5, v0}, Landroid/graphics/Matrix;->postRotate(F)Z

    move v2, v6

    .line 185
    goto :goto_3

    :cond_3
    const-string v2, "8"

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_5

    .line 186
    const/high16 v0, 0x4387

    invoke-virtual {v5, v0}, Landroid/graphics/Matrix;->postRotate(F)Z
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1

    move v2, v6

    .line 189
    goto :goto_3

    :catch_1
    move-exception v0

    move v2, v1

    goto :goto_3

    .line 196
    :catch_2
    move-exception v0

    .line 197
    invoke-static {}, Lorg/acra/ACRA;->getErrorReporter()Lorg/acra/ErrorReporter;

    move-result-object v4

    invoke-virtual {v4, v0}, Lorg/acra/ErrorReporter;->a(Ljava/lang/Throwable;)V

    move-object v0, v3

    goto :goto_4

    .line 205
    :cond_4
    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->a:Landroid/graphics/Bitmap;

    goto/16 :goto_1

    :cond_5
    move v2, v1

    goto :goto_3

    :cond_6
    move-object v4, v3

    goto/16 :goto_0
.end method

.method private a(Landroid/graphics/Bitmap;)Z
    .locals 4
    .parameter

    .prologue
    const/4 v0, 0x0

    .line 120
    :try_start_0
    const-string v1, "PhotoData.jpg"

    const/4 v2, 0x0

    invoke-virtual {p0, v1, v2}, Lcom/TwinBlade/PicturePassword/Crop;->openFileOutput(Ljava/lang/String;I)Ljava/io/FileOutputStream;

    move-result-object v1

    .line 121
    sget-object v2, Landroid/graphics/Bitmap$CompressFormat;->PNG:Landroid/graphics/Bitmap$CompressFormat;

    const/16 v3, 0x5a

    invoke-virtual {p1, v2, v3, v1}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 122
    invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 123
    const/4 v0, 0x1

    .line 126
    :goto_0
    return v0

    .line 124
    :catch_0
    move-exception v1

    .line 125
    invoke-static {}, Lorg/acra/ACRA;->getErrorReporter()Lorg/acra/ErrorReporter;

    move-result-object v2

    invoke-virtual {v2, v1}, Lorg/acra/ErrorReporter;->a(Ljava/lang/Throwable;)V

    goto :goto_0
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/Crop;Ljava/io/File;Landroid/graphics/Bitmap;)Z
    .locals 1
    .parameter
    .parameter
    .parameter

    .prologue
    .line 106
    invoke-direct {p0, p1, p2}, Lcom/TwinBlade/PicturePassword/Crop;->a(Ljava/io/File;Landroid/graphics/Bitmap;)Z

    move-result v0

    return v0
.end method

.method private a(Ljava/io/File;Landroid/graphics/Bitmap;)Z
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 108
    :try_start_0
    new-instance v0, Ljava/io/FileOutputStream;

    invoke-direct {v0, p1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V

    .line 109
    sget-object v1, Landroid/graphics/Bitmap$CompressFormat;->PNG:Landroid/graphics/Bitmap$CompressFormat;

    const/16 v2, 0x5a

    invoke-virtual {p2, v1, v2, v0}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 110
    invoke-virtual {v0}, Ljava/io/FileOutputStream;->close()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 111
    const/4 v0, 0x1

    .line 114
    :goto_0
    return v0

    .line 112
    :catch_0
    move-exception v0

    .line 113
    invoke-static {}, Lorg/acra/ACRA;->getErrorReporter()Lorg/acra/ErrorReporter;

    move-result-object v1

    invoke-virtual {v1, v0}, Lorg/acra/ErrorReporter;->a(Ljava/lang/Throwable;)V

    .line 114
    const/4 v0, 0x0

    goto :goto_0
.end method

.method static synthetic b(Lcom/TwinBlade/PicturePassword/Crop;)Landroid/app/ProgressDialog;
    .locals 1
    .parameter

    .prologue
    .line 47
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->f:Landroid/app/ProgressDialog;

    return-object v0
.end method

.method static synthetic b(Lcom/TwinBlade/PicturePassword/Crop;Landroid/app/ProgressDialog;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 46
    iput-object p1, p0, Lcom/TwinBlade/PicturePassword/Crop;->e:Landroid/app/ProgressDialog;

    return-void
.end method

.method private b()Z
    .locals 1

    .prologue
    .line 238
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->c:Lcom/TwinBlade/PicturePassword/TouchImageView;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/TouchImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->c:Lcom/TwinBlade/PicturePassword/TouchImageView;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/TouchImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->c:Lcom/TwinBlade/PicturePassword/TouchImageView;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/TouchImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method static synthetic b(Lcom/TwinBlade/PicturePassword/Crop;Landroid/graphics/Bitmap;)Z
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 118
    invoke-direct {p0, p1}, Lcom/TwinBlade/PicturePassword/Crop;->a(Landroid/graphics/Bitmap;)Z

    move-result v0

    return v0
.end method

.method static synthetic c(Lcom/TwinBlade/PicturePassword/Crop;)Lcom/TwinBlade/PicturePassword/TouchImageView;
    .locals 1
    .parameter

    .prologue
    .line 44
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->c:Lcom/TwinBlade/PicturePassword/TouchImageView;

    return-object v0
.end method

.method static synthetic d(Lcom/TwinBlade/PicturePassword/Crop;)Landroid/graphics/Bitmap;
    .locals 1
    .parameter

    .prologue
    .line 42
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->b:Landroid/graphics/Bitmap;

    return-object v0
.end method

.method static synthetic e(Lcom/TwinBlade/PicturePassword/Crop;)Landroid/app/ProgressDialog;
    .locals 1
    .parameter

    .prologue
    .line 46
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->e:Landroid/app/ProgressDialog;

    return-object v0
.end method

.method static synthetic f(Lcom/TwinBlade/PicturePassword/Crop;)V
    .locals 0
    .parameter

    .prologue
    .line 225
    invoke-direct {p0}, Lcom/TwinBlade/PicturePassword/Crop;->a()V

    return-void
.end method

.method static synthetic g(Lcom/TwinBlade/PicturePassword/Crop;)Landroid/os/Handler;
    .locals 1
    .parameter

    .prologue
    .line 48
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->g:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic h(Lcom/TwinBlade/PicturePassword/Crop;)Ljava/lang/Runnable;
    .locals 1
    .parameter

    .prologue
    .line 49
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->h:Ljava/lang/Runnable;

    return-object v0
.end method

.method static synthetic i(Lcom/TwinBlade/PicturePassword/Crop;)Z
    .locals 1
    .parameter

    .prologue
    .line 237
    invoke-direct {p0}, Lcom/TwinBlade/PicturePassword/Crop;->b()Z

    move-result v0

    return v0
.end method

.method static synthetic j(Lcom/TwinBlade/PicturePassword/Crop;)Landroid/graphics/Bitmap;
    .locals 1
    .parameter

    .prologue
    .line 41
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->a:Landroid/graphics/Bitmap;

    return-object v0
.end method


# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
    .locals 6
    .parameter
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "NewApi"
        }
    .end annotation

    .prologue
    const/4 v5, 0x0

    const/4 v4, 0x0

    const/4 v3, 0x1

    .line 55
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    .line 56
    const-string v1, "ForceOrientation"

    const-string v2, "0"

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 57
    const-string v1, "0"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_3

    .line 58
    invoke-static {}, Lcom/TwinBlade/PicturePassword/Utilities;->a()Z

    move-result v0

    if-nez v0, :cond_2

    .line 59
    invoke-virtual {p0, v3}, Lcom/TwinBlade/PicturePassword/Crop;->setRequestedOrientation(I)V

    .line 69
    :cond_0
    :goto_0
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 70
    invoke-virtual {p0, v3}, Lcom/TwinBlade/PicturePassword/Crop;->requestWindowFeature(I)Z

    .line 71
    iput-object p0, p0, Lcom/TwinBlade/PicturePassword/Crop;->d:Landroid/content/Context;

    .line 72
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->g:Landroid/os/Handler;

    .line 73
    new-instance v0, Lcom/TwinBlade/PicturePassword/o;

    invoke-direct {v0, p0}, Lcom/TwinBlade/PicturePassword/o;-><init>(Lcom/TwinBlade/PicturePassword/Crop;)V

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->h:Ljava/lang/Runnable;

    .line 80
    const v0, 0x7f030001

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/Crop;->setContentView(I)V

    .line 81
    const v0, 0x7f080003

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/Crop;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/TwinBlade/PicturePassword/TouchImageView;

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->c:Lcom/TwinBlade/PicturePassword/TouchImageView;

    .line 82
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->c:Lcom/TwinBlade/PicturePassword/TouchImageView;

    const/high16 v1, 0x4080

    invoke-virtual {v0, v1}, Lcom/TwinBlade/PicturePassword/TouchImageView;->setMaxZoom(F)V

    .line 83
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0xa

    if-le v0, v1, :cond_1

    .line 84
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->c:Lcom/TwinBlade/PicturePassword/TouchImageView;

    invoke-virtual {v0, v3, v5}, Lcom/TwinBlade/PicturePassword/TouchImageView;->setLayerType(ILandroid/graphics/Paint;)V

    .line 87
    :cond_1
    const v0, 0x7f080004

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/Crop;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    .line 88
    const v1, 0x7f080005

    invoke-virtual {p0, v1}, Lcom/TwinBlade/PicturePassword/Crop;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    .line 89
    new-instance v2, Lcom/TwinBlade/PicturePassword/p;

    invoke-direct {v2, p0}, Lcom/TwinBlade/PicturePassword/p;-><init>(Lcom/TwinBlade/PicturePassword/Crop;)V

    invoke-virtual {v0, v2}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 95
    new-instance v0, Lcom/TwinBlade/PicturePassword/q;

    invoke-direct {v0, p0}, Lcom/TwinBlade/PicturePassword/q;-><init>(Lcom/TwinBlade/PicturePassword/Crop;)V

    invoke-virtual {v1, v0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 103
    new-instance v0, Lcom/TwinBlade/PicturePassword/r;

    invoke-direct {v0, p0, v5}, Lcom/TwinBlade/PicturePassword/r;-><init>(Lcom/TwinBlade/PicturePassword/Crop;Lcom/TwinBlade/PicturePassword/r;)V

    new-array v1, v4, [Ljava/lang/Void;

    invoke-virtual {v0, v1}, Lcom/TwinBlade/PicturePassword/r;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    .line 104
    return-void

    .line 61
    :cond_2
    invoke-virtual {p0, v4}, Lcom/TwinBlade/PicturePassword/Crop;->setRequestedOrientation(I)V

    goto :goto_0

    .line 63
    :cond_3
    const-string v1, "1"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 64
    invoke-virtual {p0, v3}, Lcom/TwinBlade/PicturePassword/Crop;->setRequestedOrientation(I)V

    goto :goto_0

    .line 65
    :cond_4
    const-string v1, "2"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 66
    invoke-virtual {p0, v4}, Lcom/TwinBlade/PicturePassword/Crop;->setRequestedOrientation(I)V

    goto/16 :goto_0
.end method

.method public onDestroy()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 243
    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    .line 244
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->c:Lcom/TwinBlade/PicturePassword/TouchImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/TwinBlade/PicturePassword/TouchImageView;->setDrawingCacheEnabled(Z)V

    .line 246
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->a:Landroid/graphics/Bitmap;

    if-eqz v0, :cond_0

    .line 247
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->a:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    .line 248
    iput-object v2, p0, Lcom/TwinBlade/PicturePassword/Crop;->a:Landroid/graphics/Bitmap;

    .line 251
    :cond_0
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->b:Landroid/graphics/Bitmap;

    if-eqz v0, :cond_1

    .line 252
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Crop;->b:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    .line 253
    iput-object v2, p0, Lcom/TwinBlade/PicturePassword/Crop;->b:Landroid/graphics/Bitmap;

    .line 255
    :cond_1
    return-void
.end method
